In [1]:
import astroquery
print(astroquery.__version__)


0.3.6

Vizier Queries


In [2]:
from astroquery.vizier import Vizier
catalog_list = Vizier.find_catalogs('Kennicut')
['{}: {}'.format(k, v.description) for k, v in catalog_list.items()]


Out[2]:
['VII/141: Spectrophotometric Atlas of Galaxies (Kennicutt Jr. 1992)',
 'J/ApJ/463/26: VI photometry of 29 Cepheids in M101. (Kelson+ 1996)',
 'J/ApJ/507/655: VI photometry of new Cepheids in NGC 2541 (Ferrarese+, 1998)',
 'J/ApJ/508/491: M101 Cepheids (Stetson+, 1998)',
 'J/ApJ/510/104: Ionizing Stars of Extragalactic H II Regions (Bresolin+ 1999)',
 'J/ApJ/512/48: VI photometry of new Cepheids in NGC 4725 (Gibson+, 1999)',
 'J/ApJ/514/614: VI photometry of new Cepheids in NGC 3198 (Kelson+, 1999)',
 'J/ApJ/523/540: VI photometry of new Cepheids in NGC 3319 (Sakai+, 1999)',
 'J/ApJ/529/723: VI photometry of Cepheids (Gibson+, 2000)',
 'J/ApJ/633/871: Positions and photometry of HII knots in M51 (Calzetti+, 2005)',
 'J/ApJ/646/161: Classification of IR galaxies (Dale+, 2006)',
 'J/ApJ/648/987: UV through far-IR analysis of M81 (Perez-Gonzalez+, 2006)',
 'J/ApJ/656/770: Mid-IR spectrum of star-forming galaxies (Smith+, 2007)',
 'J/ApJ/661/801: Survey for ionization in neutral gas galaxies. III. (Oey+, 2007)',
 'J/ApJ/669/959: Warm molecular hydrogen in SINGS galaxy sample (Roussel+, 2007)',
 'J/ApJ/671/333: Aperture photometry in NGC 5194 (Kennicutt+, 2007)',
 'J/ApJ/693/1821: The Spitzer infrared nearby galaxies survey (Dale+, 2009)',
 'J/ApJ/695/580: Oxygen abundance in M83 (Bresolin+, 2009)',
 'J/ApJ/701/1965: Radial dust properties of SINGS galaxies (Munoz-Mateos+, 2009)',
 'J/ApJ/703/517: The Spitzer Local Volume Legacy: IR photometry (Dale+, 2009)',
 'J/ApJ/703/1569: Radial distribution in SINGS galaxies. I. (Munoz-Mateos+, 2009)',
 'J/ApJ/703/1672: Far-IR and H{alpha} fluxes in galaxies (Kennicutt+, 2009)',
 'J/ApJ/706/553: Fluxes in nearby star-forming galaxies (Boquien+, 2009)',
 'J/ApJ/706/599: H{alpha} and UV SFR in the local volume (Lee+, 2009)',
 'J/ApJ/714/1256: Far-IR star formation rate indicators (Calzetti+, 2010)',
 'J/ApJ/715/506: Aromatic inventory of the local volume (Marble+, 2010)',
 'J/ApJ/731/28: UV star-forming association in spiral galaxies (Alberts+, 2011)',
 'J/ApJ/737/L20: Metallicity dependent star formation rates (Dib, 2011)',
 'J/ApJ/744/44: H{alpha} and UV fluxes in nearby galaxies (Weisz+, 2012)',
 'J/ApJ/745/95: Herschel FIR & submm photometry of KINGFISH sample (Dale+, 2012)',
 'J/ApJ/757/52: UV and IR observations for SINGS galaxies. I. (Mao+, 2012)',
 'J/ApJ/767/51: Clusters of starburst galaxy NGC4214 (Andrews+, 2013)',
 'J/ApJ/772/27: Pa{alpha} (1.87um) LF of HII regions in 12 galaxies (Liu+, 2013)',
 'J/ApJ/772/107: Giant molecular clouds in nearby galaxies (Donovan Meyer+, 2013)',
 'J/ApJ/824/71: Compact star clusters in M51 with HST (Chandar+, 2016)',
 'J/ApJS/73/661: H II regions in M 101 (Hodge+ 1990)',
 'J/ApJS/164/81: Spectrophotometry of nearby galaxies (Moustakas+, 2006)',
 'J/ApJS/165/307: Survey for ionization in neutral gas galaxies. I. (Meurer+, 2006)',
 'J/ApJS/173/572: GALEX/Spitzer photometry in NGC 7331 (Thilker+, 2007)',
 'J/ApJS/178/247: H{alpha} and [NII] survey in local 11 Mpc (Kennicutt+, 2008)',
 'J/ApJS/190/233: Spectroscopy and abundances of SINGS galaxies (Moustakas+, 2010)',
 'J/ApJS/192/6: A GALEX UV imaging survey of nearby galaxies (Lee+, 2011)',
 'J/ApJS/199/36: H{alpha} survey of nearby clusters of galaxies (Sakai+, 2012)',
 'J/A+A/546/A2: Spectroscopy of HII regions in nearby galaxies (Sanchez+, 2012)',
 'J/A+A/552/A19: Radio-farIR correlation in NGC 6946 (Tabatabaei+, 2013)',
 'J/A+A/559/A114: Updated O3N2 and N2 abundance indicators (Marino+, 2013)',
 'J/A+A/576/A33: KINGFISH galaxy sample radial profile SED (Hunt+, 2015)',
 'J/A+A/576/A135: CALIFA DR2 (Garcia-Benito+, 2015)',
 'J/A+A/584/A87: CALIFA sample SFR calibration (Catalan-Torrecilla+, 2015)',
 'J/A+A/595/A43: Photometry of 119 HII regions in M33 (Relano+, 2016)',
 'J/AJ/130/1324: Faint emission-line galaxies at z<=1.6 (Drozdovsky+, 2005)',
 'J/AJ/132/231: MMT hectospec redshift survey of 24um sources (Papovich+, 2006)',
 'J/AJ/136/2563: HI Nearby Galaxy Survey, THINGS (Walter+, 2008)',
 'J/AJ/139/279: Outlying HII regions in HI-selected galaxies (Werk+, 2010)',
 'J/AJ/141/23: HI holes in THINGS galaxies (Bagetakos+, 2011)',
 'J/MNRAS/403/683: GALEX Arecibo SDSS survey (GASS) (Catinella+, 2010)',
 'J/MNRAS/405/857: Star clusters in NGC 3256 (Goddard+, 2010)',
 'J/MNRAS/412/1539: Ages of stars in dwarf galaxies (Bastian+, 2011)',
 'J/MNRAS/433/543: Choirs, HI galaxy groups (Sweet+, 2013)',
 'J/MNRAS/445/881: LVL global optical photometry (Cook+, 2014)',
 'J/MNRAS/445/899: LVL SEDs and physical properties (Cook+, 2014)',
 'J/MNRAS/454/3664: Abundance gradients in low SB spirals (Bresolin+, 2015)']

In [3]:
Vizier.get_catalogs('J/ApJS/178/247')


Out[3]:
TableList with 2 tables:
	'0:J/ApJS/178/247/11Mpc' with 20 column(s) and 50 row(s) 
	'1:J/ApJS/178/247/refs' with 4 column(s) and 50 row(s) 

In [4]:
Vizier.get_catalogs('J/ApJS/178/247')[0]


Out[4]:
Table masked=True length=50
SeqNamen_NameRAJ2000DEJ2000TTBmagczvLGDistl_logflogfl_EWEWBMAGNII_Hal_LHaLHaSimbadNameNED
"h:m:s""d:m:s"magkm / skm / sMpc[mW/m2]0.1 nmmag[10-7W]
int16bytes14bytes1bytes10bytes9int16float32int16int16float32bytes1float32bytes1float64float32float32bytes1float32bytes24bytes3
1UGC12894s00 00 22.5+39 29 441016.553356188.20-13.42---13.480.0438.58UGC12894NED
2WLMp00 01 58.1-15 27 391011.03-122-160.92-11.6825.0-13.910.0438.34WLMNED
3ESO409-IG015s00 05 31.8-28 05 53615.1473778010.40-12.34262.0-15.020.0739.77ESO409-IG015NED
4ESO349-G031s00 08 13.3-34 34 421015.562212303.21<-15.100.0-12.030.02<36.00ESO349-G031NED
5NGC24p00 09 56.7-24 57 44512.195546108.10-11.8719.0-17.430.1739.98NGC24NED
6NGC45p00 14 04.0-23 10 55811.324675307.10-11.2238.0-18.000.2240.49NGC45NED
7NGC55p00 14 54.0-39 11 4998.421291112.17-10.1241.0-18.320.2540.55NGC55NED
8NGC59s00 15 25.4-21 26 42-313.123624325.30-12.3638.0-15.580.0839.15NGC59NED
9MCG-04-02-003s00 19 11.4-22 40 06915.576697319.80-13.1526.0-14.450.0538.90MCG-04-02-003NED
............................................................
41NGC891s02 22 33.4+42 20 57310.815287389.20-11.3515.0-19.290.3640.59NGC891NED
42UGC1865p02 25 00.2+36 02 16914.375807749.20-12.7330.0-15.690.0939.30UGC1865NED
43NGC925p02 27 16.9+33 34 45710.695537399.16-11.0825.0-19.410.3840.85NGC925NED
44UGC1924s02 27 49.8+31 43 36615.2359877810.40-13.42---15.160.0738.74UGC1924NED
45NGC949p02 30 48.6+37 08 14412.406098019.20-11.7826.0-17.620.1940.20NGC949NED
46NGC959p02 32 24.0+35 29 42812.955977849.20-12.0938.0-17.090.2839.86NGC959NED
47UGC2014s02 32 54.0+38 40 501015.655657609.20-13.3416.0-14.350.0538.69UGC2014NED
48UGC2023p02 33 18.2+33 29 281013.885897709.20-12.4132.0-16.300.1039.64UGC2023NED
49UGC2034s02 33 42.9+40 31 411013.705787779.20-12.5111.0-16.320.1139.50UGC2034NED
50ESO115-G021p02 37 48.1-61 20 18813.345153394.99-12.1131.0-15.210.0739.35ESO115-G021NED

Customize class to get all columns and all lines (limited to 50 by default):


In [5]:
Custom_Vizier = Vizier(columns=['**'])
Custom_Vizier.ROW_LIMIT = -1

In [6]:
Custom_Vizier.get_catalogs('J/ApJS/178/247')[0]


Out[6]:
Table masked=True length=436
SeqNamen_NameRAJ2000DEJ2000GLatTTBmage_BmagczvLGDistn_DistRefl_logflogfe_logfl_EWEWe_EWn_EWTelCoverABBMAGNII_Har_NII_Hal_LHaLHaSimbadNameNED
"h:m:s""d:m:s"degmagmagkm / skm / sMpc[mW/m2][mW/m2]0.1 nm0.1 nmmagmag[10-7W]
int16bytes14bytes1bytes10bytes9float32int16float32float32int16int16float32bytes7bytes7bytes1float32float32bytes1float64float32float32bytes4float32float32float32float32uint8bytes1float32bytes24bytes3
1UGC12894s00 00 22.5+39 29 44-22.321016.550.203356188.20v(flow)120-13.420.030----2.3--0.45-13.480.04338.58UGC12894NED
2WLMp00 01 58.1-15 27 39-73.631011.030.08-122-160.92trgb11, 118-11.680.13025.09.01.1KPNO2.20.13-13.910.04338.34WLMNED
3ESO409-IG015s00 05 31.8-28 05 53-79.79615.140.1973778010.40v(flow)111-12.340.040262.026.02.1--0.08-15.020.07339.77ESO409-IG015NED
4ESO349-G031s00 08 13.3-34 34 42-78.121015.560.202212303.21trgb7, 111<-15.10--0.0--2.2--0.05-12.030.023<36.00ESO349-G031NED
5NGC24p00 09 56.7-24 57 44-80.43512.190.135546108.10v(flow)118-11.870.04019.01.02.1--0.07-17.430.17339.98NGC24NED
6NGC45p00 14 04.0-23 10 55-80.67811.320.084675307.10v(flow)118-11.220.04038.010.02.2--0.07-18.000.22340.49NGC45NED
7NGC55p00 14 54.0-39 11 49-75.7498.420.051291112.17trgb62, 118-10.120.02041.010.02.2--0.06-18.320.25340.55NGC55NED
8NGC59s00 15 25.4-21 26 42-80.02-313.120.143624325.30sbf21, 118-12.360.06038.05.01.2KPNO1.00.07-15.580.08339.15NGC59NED
9MCG-04-02-003s00 19 11.4-22 40 06-81.44915.570.326697319.80v(flow)111-13.150.05026.03.02.1--0.07-14.450.05338.90MCG-04-02-003NED
.............................................................................................
427ESO347-G017p23 26 56.0-37 20 49-69.49914.40--6927039.40v(flow)114-12.530.05034.04.01.1CTIO1.00.07-15.520.08339.48ESO347-G017NED
428UGC12613p23 28 36.2+14 44 35-43.551012.500.15-183600.76trgb59, 120-13.380.1401.01.01.1KPNO1.00.19-12.090.02336.50UGC12613NED
429UGC12632s23 29 58.7+40 59 25-19.31912.780.174227189.60v(flow)118-12.180.04040.06.01.2KPNO2.00.56-17.690.19339.92UGC12632NED
430IC5332p23 34 27.4-36 06 05-71.37711.210.157017159.50v(flow)111-11.310.06023.04.02.1--0.07-18.760.29340.63IC5332NED
431NGC7713p23 36 15.4-37 56 19-70.88711.510.156926969.30v(flow)118-11.490.06047.05.02.1--0.07-18.400.15140.48NGC7713NED
432UGC12713p23 38 14.4+30 42 29-29.58014.910.032995787.70v(flow)120-12.830.05029.04.01.1KPNO1.00.25-14.780.04239.07UGC12713NED
433UGCA442p23 43 45.5-31 57 22-74.53913.600.152673004.27trgb31, 118-12.460.05025.04.01.1CTIO1.00.07-14.620.06338.87UGCA442NED
434ESO348-G009s23 49 23.5-37 46 19-73.171016.700.706486488.60v(flow)111-13.170.05017.02.02.1--0.06-13.000.03338.78ESO348-G009NED
435ESO149-G003s23 52 02.8-52 34 40-62.241015.040.145765006.40tf31, 111-12.740.03043.03.02.1--0.06-14.050.04338.95ESO149-G003NED
436NGC7793p23 57 49.7-32 35 30-77.1779.630.052272503.91trgb31, 118-10.600.08040.010.02.1--0.08-18.410.25340.58NGC7793NED

SQL in SDSS


In [8]:
from astroquery.sdss import SDSS

sdss = SDSS()

query = "select top 10 z, ra, dec, bestObjID from specObj where class = 'galaxy' and z > 0.3 and zWarning = 0"
        
sdss.query_sql(query)


Out[8]:
Table length=10
zradecbestObjID
float64float64float64int64
0.3000005174.5405124.2000281237667549812162759
0.300001249.4594110.8477541237660241924063461
0.3000027156.250247.65862711237658425162858683
0.3000035184.90501-3.30950951237650760782053596
0.3000046175.6512534.375481237665128003731630
0.3000049355.0640211.0655021237679320160993477
0.3000053236.619520.796787731237655468065620483
0.3000054138.2241122.7198581237667111721042523
0.3000055156.15649.6155651237657857677000910
0.3000057234.240117.76572561237661949202137472

Query for the same object either by name or by coordinates


In [9]:
from astropy.coordinates import SkyCoord
coord_hd189 = SkyCoord('20h00m43.71s +22d42m39.07s')

In [10]:
from astroquery.esasky import ESASky
esasky = ESASky()

In [11]:
esasky.query_object_catalogs(coord_hd189)


Out[11]:
TableList with 6 tables:
	'0:XMM-EPIC' with 6 column(s) and 17 row(s) 
	'1:TYCHO-2' with 7 column(s) and 1 row(s) 
	'2:HIPPARCOS-2' with 7 column(s) and 1 row(s) 
	'3:GAIA DR1 TGAS' with 10 column(s) and 1 row(s) 
	'4:XMM-OM' with 12 column(s) and 5 row(s) 
	'5:GAIA DR1' with 7 column(s) and 1 row(s) 

In [12]:
esasky.query_object_catalogs('HD189733')


Out[12]:
TableList with 6 tables:
	'0:XMM-EPIC' with 6 column(s) and 17 row(s) 
	'1:TYCHO-2' with 7 column(s) and 1 row(s) 
	'2:HIPPARCOS-2' with 7 column(s) and 1 row(s) 
	'3:GAIA DR1 TGAS' with 10 column(s) and 1 row(s) 
	'4:XMM-OM' with 12 column(s) and 5 row(s) 
	'5:GAIA DR1' with 7 column(s) and 1 row(s) 

In [ ]: